#pragma once
#include <list>
#include <ostream>
#include <map>

typedef std::list<char>::iterator ITR;
typedef std::map<int , ITR>::iterator MAPITR;
class BigNum
{
public:
	BigNum(void);
	~BigNum(void);
	BigNum(BigNum& r_value);
	int size();
	void clear();
	bool empty();
	int getLowerIndex();
	int getToperIndex();
	void push_back(char& p_value);
	void push_front(char& p_value);
	void singleTime(BigNum& temp_result,char curr_bit);
	char& operator[](int r_value);
	BigNum operator+=(BigNum& r_value);
	BigNum operator *(BigNum& r_value);
	BigNum operator =(BigNum& r_value);
	friend std::ostream& operator <<(std::ostream& out,BigNum& obj);
	//friend std::istream& operator >>(std::istream& in,BigNum& obj);
private:
	std::list<char> m_num;
	std::map<int ,ITR> m_it_map;
	int lower_index;
	int toper_index;
};

